﻿using QuickChat_Service.Repositories.Database;
using QuickChat_Service.Repositories.Repositories;
using QuickChat_Service.Repositories.Repositories.Implementations;
using QuickChat_Service.Repositories.Repositories.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QuickChat_Service.Repositories
{
    public class ChatServiceUnitOfWork : IChatServiceUnitOfWork
    {
        private static QuickChatApplicationEntities context = new QuickChatApplicationEntities();

        public ITalkerRepository talkerRepo
        {
            get 
            {
                return new EFTalkerRepository(context); 
            }
        }

        public IMessageRepository messageRepo
        {
            get 
            {
                return new EFMessageRepository(context); 
            }
        }

        public IChatRoomRepository chatRoomRepo
        {
            get 
            {
                return new EFChatRoomRepository(context); 
            }
        }

        public IChatSessionRepository chatSessionRepo
        {
            get 
            {
                return new EFChatSessionRepository(context); 
            }
        }
    }
}
